namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update00271 : DbMigration
    {
        public override void Up()
        {
            //RenameTable(name: "dbo.HrmMpPositionType", newName: "hrm_mp_position_types");
            //DropForeignKey("dbo.HrmMpPositionType", "HrmPsEmployeeTypes_EmpTypeId", "dbo.hrm_ps_employee_types");
            //DropIndex("dbo.HrmMpPositionType", new[] { "HrmPsEmployeeTypes_EmpTypeId" });
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "PosTypeId", newName: "pos_type_seq");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "PosTypeName", newName: "pos_type_name");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "PosTypeNameShort", newName: "pos_type_name_short");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "PosTypeEng", newName: "pos_type_eng");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "PosTypeEngShort", newName: "pos_type_eng_short");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "EmpTypeId", newName: "emp_type_seq");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "RecordStatus", newName: "record_status");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "CreatedBy", newName: "created_by");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "CreatedWhen", newName: "created_when");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "UpdatedBy", newName: "updated_by");
            //RenameColumn(table: "dbo.hrm_mp_position_types", name: "UpdatedWhen", newName: "updated_when");
            //AlterColumn("dbo.hrm_mp_position_types", "remarks", c => c.String());
            //DropColumn("dbo.hrm_mp_position_types", "HrmPsEmployeeTypes_EmpTypeId");
        }
        
        public override void Down()
        {
            AddColumn("dbo.hrm_mp_position_types", "HrmPsEmployeeTypes_EmpTypeId", c => c.Int());
            AlterColumn("dbo.hrm_mp_position_types", "Remarks", c => c.String());
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "updated_when", newName: "UpdatedWhen");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "updated_by", newName: "UpdatedBy");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "created_when", newName: "CreatedWhen");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "created_by", newName: "CreatedBy");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "record_status", newName: "RecordStatus");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "emp_type_seq", newName: "EmpTypeId");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "pos_type_eng_short", newName: "PosTypeEngShort");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "pos_type_eng", newName: "PosTypeEng");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "pos_type_name_short", newName: "PosTypeNameShort");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "pos_type_name", newName: "PosTypeName");
            RenameColumn(table: "dbo.hrm_mp_position_types", name: "pos_type_seq", newName: "PosTypeId");
            CreateIndex("dbo.HrmMpPositionType", "HrmPsEmployeeTypes_EmpTypeId");
            AddForeignKey("dbo.HrmMpPositionType", "HrmPsEmployeeTypes_EmpTypeId", "dbo.hrm_ps_employee_types", "emp_type_seq");
            RenameTable(name: "dbo.hrm_mp_position_types", newName: "HrmMpPositionType");
        }
    }
}
